home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 816 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: tim.xenologics.com!usenet
  2. From: zippo@edina.xnc.com (Peter Liebetrau)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: asm code needed to check thecurrent processor ...
  5. Date: 11 Jan 1996 20:24:10 GMT
  6. Organization: Xenologics Networks & Communications GmbH
  7. Message-ID: <853.6584T814T159@edina.xnc.com>
  8. References: <4d1j99$fs6@rc1.vub.ac.be>
  9. NNTP-Posting-Host: slip-3.xenologics.com
  10. X-Newsreader: THOR 2.1 (Amiga;TCP/IP beta 5) *UNREGISTERED*
  11.  
  12. Hi,
  13.  
  14. >    hi, I'm looking for some asm code to check current processor
  15. >(680x0) available, fpu, mmu on a Amiga.
  16.  
  17. >    I'f you have some routines ... could you send it to me ...
  18.  
  19. in  the  ExecBase  at the offset 296 you find AttnFlags.  Here the
  20. Processorversion is written !
  21. Each bit is for one processor. If AttnFlags is 0 then it is a simple 68000
  22.  
  23. Bit  Processor
  24.  0   68010
  25.  1   68020
  26.  2   68030  also set for 68040
  27.  3   68040
  28.  4   68881  also set for 68882
  29.  5   68882
  30.  6   FPU40  Set if 68040 FPU
  31.  
  32. For more information, take a look to the includes /exec/execbase.h
  33. or .i ?!?!  :-)
  34.  
  35. Some Code ....
  36.  
  37. cpu_:
  38.   dc.l 0
  39.  
  40.   MOVE.l 4,a0
  41.   MOVE 296(a0),d1
  42.   MOVEQ #0,d0
  43.   AND #15,d1
  44. loop
  45.   BEQ done
  46.   ADDQ #1,d0
  47.   LSR #1,d1
  48.   BRA loop
  49. done
  50.   RTS
  51.  
  52. From 1 to 4, d0 now is the processornumber !
  53. 0       =       68000
  54. 1       =       68010
  55. [...]
  56. 4       =       68040
  57.  
  58.  
  59.